<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Configuration Wizard Annotations</title>
<title>CMSIS-Pack: Configuration Wizard Annotations</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-Pack
   &#160;<span id="projectnumber">Version 1.6.0</span>
   </div>
   <div id="projectbrief">Delivery Mechanism for Software Packs</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('configWizard.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Configuration Wizard Annotations </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="configWizard_annotations"></a>
Annotation Rules</h1>
<p><b>Configuration Wizard Annotations</b> consist of annotation items and annotation modifiers. They create GUI-like elements in IDEs for configuration files (see <a class="el" href="configWizard.html#configWizard_display">Tool-specific display</a>). Using a GUI-like approach makes it easier for the user to check and adapt configuration files to the application needs. The following rules apply:</p>
<ul>
<li>The Configuration Wizard section must begin within the first 100 lines of code and must start with the following comment line: <div class="fragment"><div class="line"><span class="comment">// &lt;&lt;&lt; Use Configuration Wizard in Context Menu &gt;&gt;&gt;</span></div>
</div><!-- fragment --></li>
<li>The Configuration Wizard section can end with the following optional comment: <div class="fragment"><div class="line"><span class="comment">// &lt;&lt;&lt; end of configuration section &gt;&gt;&gt;</span></div>
</div><!-- fragment --></li>
<li>Annotations are written as comments in the code. Each annotation line must start with a double forward slash (//).</li>
<li>By default, the next code symbol that follows the annotation is modified.</li>
<li>Items marked with * in the table below can be followed by a skip-value. A skip-value omits a number of code symbols (see <em>skip example</em> in table). This overwrites the previous rule.</li>
<li>A descriptive text can be added to items. This text is displayed on screen (see table).</li>
<li>Whitespace characters are ignored in annotation items or annotation modifiers (text excluded).</li>
<li>You must not use &lt; or &gt; within configuration wizard lines other than for enclosing annotation items.</li>
</ul>
<p>The following table lists the Configuration Wizard Annotations:</p>
<table  class="cmtable" summary="Annotations Tab">
<tr>
<th>Item </th><th>Text </th><th>Description  </th></tr>
<tr>
<td>&lt;h&gt; </td><td>yes </td><td>Heading. Creates a header section. All items and options enclosed by &lt;h&gt; and &lt;/h&gt; belong to one group and can be expanded. This entry makes no changes to code symbols. It is just used to group other items and modifiers. <br/>
 Excerpt from the <a class="el" href="configWizard.html#configWizard_codeExample">Code Example</a> <div class="fragment"><div class="line"><span class="comment">// &lt;h&gt;Thread Configuration                               -- header without checkbox to group other items</span></div>
<div class="line"><span class="comment">//   ...</span></div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
</div><!-- fragment --> Is the header entry as shown in <a class="el" href="configWizard.html#configWizard_display">Tool-specific display</a>.   </td></tr>
<tr>
<td>&lt;e&gt;<sup>*</sup> </td><td>yes </td><td>Heading with enable. Creates a header section with a checkbox to enabled or disabled all items and options enclosed by &lt;e&gt; and &lt;/e&gt;. Excerpt from the <a class="el" href="configWizard.html#configWizard_codeExample">Code Example</a>. <div class="fragment"><div class="line"><span class="comment">// &lt;e&gt;Round-Robin Thread switching                       -- header with checkbox</span></div>
<div class="line"><span class="comment">// ===============================</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Enables Round-Robin Thread switching.             -- tooltip information for the header</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_ROBIN</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_ROBIN 1                                       -- this value is set through the checkbox</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span><span class="comment">// &lt;o&gt;Round-Robin Timeout [ticks] &lt;1-1000&gt;</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Defines how long a thread will execute before a thread switch.</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Default: 5</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_ROBINTOUT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_ROBINTOUT 5</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor">// &lt;/e&gt;</span></div>
</div><!-- fragment --> The entry <code>&lt;e&gt;Round-Robin Thread switching ... &lt;/e&gt;</code> sets OS_ROBIN to <span class="XML-Token">1</span> (checkbox enabled) or <span class="XML-Token">0</span> (checkbox disabled) and encloses the <em>OS_ROBINTOUT</em> (Round-Robin Timeout) setting. See screen outcome in <a class="el" href="configWizard.html#configWizard_display">Tool-specific display</a>.   </td></tr>
<tr>
<td>&lt;e.<em>i</em>&gt;<sup>*</sup> </td><td>yes </td><td>Heading with Enable: modifies a specific bit (<em>i</em>) (example: &lt;e.4&gt; - changes bit 4 of a value). <div class="fragment"><div class="line"><span class="comment">// &lt;e.4&gt;Serial Number</span></div>
<div class="line"><span class="comment">// &lt;i&gt;Enable Serial Number String.</span></div>
<div class="line"><span class="comment">// &lt;i&gt;If disabled, Serial Number String will not be assigned to USB Device.</span></div>
<div class="line"><span class="preprocessor">#define USBD0_STR_DESC_SER_EN           1</span></div>
</div><!-- fragment --> The example creates the heading <span class="XML-Token">Serial Number</span> and a checkbox to set the value. If enabled, then bit 4 of <span class="XML-Token">USBD0_STR_DESC_SER_EN</span> is set.   </td></tr>
<tr>
<td>&lt;/h&gt;, &lt;/e&gt;, or &lt;/c&gt; </td><td>yes </td><td>Heading, Enable, or Comment end.  </td></tr>
<tr>
<td>&lt;n&gt; </td><td>yes </td><td>Notification text displayed <div class="fragment"><div class="line"><span class="comment">// &lt;n&gt; This is shown as plain text</span></div>
</div><!-- fragment -->   </td></tr>
<tr>
<td>&lt;i&gt; </td><td>yes </td><td>Tooltip help for previous item. <div class="fragment"><div class="line"><span class="comment">// &lt;i&gt;This is shown as a tooltip when hovering over a text.</span></div>
</div><!-- fragment --> Many examples in this table have tooltip examples.   </td></tr>
<tr>
<td>&lt;c&gt;<sup>*</sup> </td><td>yes </td><td>Code enable: creates a checkbox to uncomment or comment code. All lines, including those with white spaces, get commented with double slashes (//) at the first found character when you disable the checkbox. <div class="fragment"><div class="line"><span class="comment">// &lt;c1&gt; Comment sequence block until block end when disabled</span></div>
<div class="line"><span class="comment">//&lt;i&gt; This may carry the block&#39;s description</span></div>
<div class="line"></div>
<div class="line">foo</div>
<div class="line"></div>
<div class="line">+bar</div>
<div class="line"></div>
<div class="line">-xFoo</div>
<div class="line"><span class="comment">// &lt;/c&gt;</span></div>
</div><!-- fragment --> In this example, the item is enabled, so that the sequence block is not commented.   </td></tr>
<tr>
<td>&lt;!c&gt;<sup>*</sup> </td><td>yes </td><td>Code disable: creates a checkbox to comment or uncomment code. All lines, including those with white spaces, get commented with double slashes (//) at the first found character when you enable the checkbox. <div class="fragment"><div class="line"><span class="comment">// &lt;!c1&gt; Comment sequence block until block end when enabled</span></div>
<div class="line"><span class="comment">//&lt;i&gt; This may carry the block&#39;s description</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">//foo</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">//+bar</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">//-xFoo</span></div>
<div class="line"><span class="comment">// &lt;/c&gt;</span></div>
</div><!-- fragment --> In this example, the item is enabled, so that the sequence block is commented.   </td></tr>
<tr>
<td>&lt;q&gt;<sup>*</sup> </td><td>yes </td><td>Option for bit values which can be set via a checkbox. <div class="fragment"><div class="line"><span class="comment">//  &lt;h&gt; Chip-select control</span></div>
<div class="line"><span class="comment">//     &lt;q&gt; ASYNCWAIT: Wait signal during asynchronous transfer</span></div>
<div class="line"><span class="comment">//      &lt;i&gt; Enables the FSMC to use the wait signal even during an asynchronous protocol.</span></div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
<div class="line"><span class="preprocessor">#define RTE_FSMC_BCR1_ASYNCWAIT         0                             -- this is changed via a checkbox</span></div>
</div><!-- fragment -->   </td></tr>
<tr>
<td>&lt;o&gt;<sup>*</sup> </td><td>yes </td><td>Option with selection or number entry. <div class="fragment"><div class="line"><span class="comment">// &lt;o&gt;Round-Robin Timeout [ticks] &lt;1-1000&gt;                             -- text displayed on screen. Range of [ticks] is [1..1000] </span></div>
<div class="line"><span class="comment">// &lt;i&gt; Defines how long a thread will execute before a thread switch.  -- tooltip info</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Default: 5                                                      -- tooltip info. Both displayed in one tooltip.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_ROBINTOUT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_ROBINTOUT 5</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor">// &lt;/e&gt;</span></div>
</div><!-- fragment --> The example creates an option with the text <span class="XML-Token">Round-Robin Timeout [ticks]</span> and a field to enter values that can range between {1..1000].   </td></tr>
<tr>
<td>&lt;o <em>key-identifier</em>&gt;<sup>* (new!)</sup> </td><td>yes </td><td><p class="starttd">Option with identifier selection replacing the identifier after the specified key-identifier: </p>
<div class="fragment"><div class="line"><span class="comment">//   &lt;o TIMESTAMP_SRC&gt;Time Stamp Source</span></div>
<div class="line"><span class="comment">//      &lt;dwt=&gt;     DWT Cycle Counter</span></div>
<div class="line"><span class="comment">//      &lt;systick=&gt; SysTick</span></div>
<div class="line"><span class="comment">//      &lt;user=&gt;    User Timer </span></div>
<div class="line"><span class="comment">//   &lt;i&gt;Selects source for 32-bit time stamp</span></div>
<div class="line"><span class="preprocessor">#define TIMESTAMP_SRC  dwt</span></div>
</div><!-- fragment --><p> The example creates an option with the text <span class="XML-Token">Time Stamp Source</span> and a drop down-list showing the text items <span class="XML-Token">DWT Cycle Counter</span>, <span class="XML-Token">SysTick</span> and <span class="XML-Token">User Timer</span>. The corresponding identifier within the tag &lt;...=&gt; will be used for replacement.</p>
<p class="endtd">Use case for an assignment of an enumeration to a variable: </p>
<div class="fragment"><div class="line"><span class="comment">//   &lt;o redPortMode&gt; Red port mode </span></div>
<div class="line"><span class="comment">//     &lt;OutPushPull_GPIO=&gt;  PushPull</span></div>
<div class="line"><span class="comment">//     &lt;OutOpenDrain_GPIO=&gt; OpenDrain</span></div>
<div class="line"><span class="comment">//   &lt;i&gt;Selects GPIO output</span></div>
<div class="line">ledConf.redPortMode = OutOpenDrain_GPIO;</div>
</div><!-- fragment --><p> The example creates an option with the text <span class="XML-Token">Red port mode</span> and a drop down-list showing the text items <span class="XML-Token">PushPull</span> and <span class="XML-Token">OpenDrain</span>. The corresponding identifier <span class="XML-Token">OutPushPull_GPIO</span> or <span class="XML-Token">OutOpenDrain_GPIO</span> will be used to replace the identifier after the key-identifier <span class="XML-Token">redPortMode</span>.  </p>
</td></tr>
<tr>
<td>&lt;o.<em>i</em>&gt;<sup>*</sup> </td><td>yes </td><td>Modify a single bit (example: &lt;e.4&gt; - modifies bit 4). <div class="fragment"><div class="line"><span class="comment">// &lt;o.4&gt; &lt;o.0&gt;High-speed</span></div>
<div class="line"><span class="comment">//   &lt;i&gt;Enable High-speed functionality (if device supports it).</span></div>
<div class="line"><span class="preprocessor">#define USBD0_HS                        0</span></div>
</div><!-- fragment --> The example creates a heading with the text <span class="XML-Token">High-speed</span> and a checkbox. If enabled, then bit 4 of <span class="XML-Token">USBD0_HS</span> is set.   </td></tr>
<tr>
<td>&lt;o.<em>x</em>..<em>y</em>&gt;<sup>*</sup>  </td><td>yes </td><td>Modify a range of bits. (example: &lt;o.4..5&gt; - bit 4 to 5). <div class="fragment"><div class="line"><span class="comment">//   &lt;h&gt;String Settings</span></div>
<div class="line"><span class="comment">//   &lt;i&gt;These settings are used to create the String Descriptor.</span></div>
<div class="line"><span class="comment">//     &lt;o.0..15&gt;Language ID &lt;0x0000-0xFCFF&gt;</span></div>
<div class="line"><span class="comment">//     &lt;i&gt;English (United States) = 0x0409.</span></div>
<div class="line"><span class="comment">//   &lt;/h&gt;</span></div>
<div class="line"><span class="preprocessor">#define USBD0_STR_DESC_LANGID           0x0409</span></div>
</div><!-- fragment --> This example creates an expandable header with the text <span class="XML-Token">String Settings</span> and an option <span class="XML-Token">Language ID</span>. The range of values is set to <span class="XML-Token">&lt;0x0000-0xFCFF&gt;</span>. Users can enter a value from within that range. The option changes the bits <span class="XML-Token">0..15</span>.   </td></tr>
<tr>
<td>&lt;s&gt;<sup>*</sup> </td><td>yes </td><td>Option with ASCII string entry. <div class="fragment"><div class="line"><span class="comment">//  &lt;s&gt;Manufacturer String</span></div>
<div class="line"><span class="comment">//  &lt;i&gt;String Descriptor describing Manufacturer.</span></div>
<div class="line"><span class="preprocessor">#define USBD0_STR_DESC_MAN              L&quot;Keil Software&quot;</span></div>
</div><!-- fragment --> Displays an option with the text <span class="XML-Token">Manufacturer String</span> and creates a field in which the user can enter a text. The size of the string is not limited.   </td></tr>
<tr>
<td>&lt;s.<em>i</em>&gt;<sup>*</sup> </td><td>yes </td><td>Option with ASCII string entry and a size limit of <em>i</em> characters. <div class="fragment"><div class="line"><span class="comment">//  &lt;s.126&gt;Manufacturer String</span></div>
<div class="line"><span class="comment">//  &lt;i&gt;String Descriptor describing Manufacturer.</span></div>
<div class="line"><span class="preprocessor">#define USBD0_STR_DESC_MAN              L&quot;Keil Software&quot;</span></div>
</div><!-- fragment --> The example sets a size limit of 126 character. Default string is "Keil Software".   </td></tr>
<tr>
<td><em>skip example</em> <br/>
 &lt;q<em>i&gt;</em>; <br/>
 &lt;o<em>i&gt;</em>; &lt;o<em>i</em>.<em>x&gt;</em>; <br/>
 &lt;s<em>i&gt;</em>; &lt;s<em>i</em>.<em>x&gt;</em>  </td><td>yes </td><td>Skip <em>i</em> items. Can be applied to all annotation items marked with a * in this table. <div class="fragment"><div class="line"><span class="comment">// &lt;o2&gt;Skip 2 and modify the third item after this entry &lt;1-9&gt;</span></div>
<div class="line"><span class="preprocessor">#define VALUE1       1000</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define VALUE2       2000</span></div>
<div class="line"><span class="preprocessor">#define MODIFY_THIS  3000</span></div>
</div><!-- fragment --> The example skips 2 items and modifies the third.   </td></tr>
<tr>
<th>Modifier </th><th>&#160; </th><th>Description  </th></tr>
<tr>
<td>&lt;0-31&gt; </td><td>no </td><td>Value range for option fields.  </td></tr>
<tr>
<td>&lt;0-100:10&gt; </td><td>no </td><td>Value range for option fields with step 10.  </td></tr>
<tr>
<td>&lt;0x40-0x1000:0x10&gt; </td><td>no </td><td>Value range in hex format and step 10.  </td></tr>
<tr>
<td>&lt;<em>value</em>=&gt; </td><td>yes </td><td>Creates a drop down-list and displays the <em><b>text</b></em>. <em><b>value</b></em> is written to the next item. Excerpt from the <a class="el" href="configWizard.html#configWizard_codeExample">Code Example</a>. <div class="fragment"><div class="line"><span class="comment">//   &lt;o&gt;Timer Thread Priority                                            -- creates a drop-down with the list below.</span></div>
<div class="line"><span class="comment">//                        &lt;1=&gt; Low</span></div>
<div class="line"><span class="comment">//     &lt;2=&gt; Below Normal  &lt;3=&gt; Normal  &lt;4=&gt; Above Normal</span></div>
<div class="line"><span class="comment">//                        &lt;5=&gt; High</span></div>
<div class="line"><span class="comment">//                        &lt;6=&gt; Realtime (highest)</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines priority for Timer Thread                               -- tooltip info</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: High                                                   -- tooltip info</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERPRIO</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_TIMERPRIO   5</span></div>
<div class="line"><span class="preprocessor">#endif</span></div>
</div><!-- fragment --> In this example, the screen would show the option <span class="XML-Token">Timer Thread Priority</span>. The field Value would display the text <span class="XML-Token">High</span>. OS_TIMERPRIO is set to <span class="XML-Token">5</span>. When clicking on the field, a drop-down would show all options. See <a class="el" href="configWizard.html#configWizard_display">Tool-specific display</a>.   </td></tr>
<tr>
<td>&lt;<em>identifier</em>=&gt; </td><td>yes </td><td>Creates a drop down-list and displays the <em><b>text</b></em> following the definition of the identifiers <span class="XML-Token">dwt</span>, <span class="XML-Token">systick</span> and <span class="XML-Token">user</span>. Note that this must only be used in the context of &lt;o key-identifier&gt;! The <em><b>identifier</b></em> corresponding to the selected text replaces the identifier following the key-identifier specified by the &lt;o ...&gt; tag. <div class="fragment"><div class="line"><span class="comment">//   &lt;o TIMESTAMP_SRC&gt;Time Stamp Source</span></div>
<div class="line"><span class="comment">//      &lt;dwt=&gt;     DWT Cycle Counter</span></div>
<div class="line"><span class="comment">//      &lt;systick=&gt; SysTick</span></div>
<div class="line"><span class="comment">//      &lt;user=&gt;    User Timer </span></div>
<div class="line"><span class="comment">//   &lt;i&gt;Selects source for 32-bit time stamp</span></div>
<div class="line"><span class="preprocessor">#define TIMESTAMP_SRC  dwt</span></div>
</div><!-- fragment --> In this example, the screen would show the option <span class="XML-Token">Time Stamp Source</span>. The field value would display the text <span class="XML-Token">DWT Cycle Counter</span>. TIMESTAMP_SRC is set to <span class="XML-Token">dwt</span>. When clicking on the field, a drop-down would show all options. See <a class="el" href="configWizard.html#configWizard_display">Tool-specific display</a>.  </td></tr>
<tr>
<td>&lt;#+1&gt;&#160;&#160; &lt;#-1&gt;<br/>
 &lt;#*8&gt;&#160;&#160; &lt;#/3&gt; </td><td>no </td><td>Modifies the entered or displayed value according to the operator (add, sub, mul, div). The changed value is set for the code symbol. <br/>
 Excerpt from <a class="el" href="configWizard.html#configWizard_codeExample">Code Example</a>. <div class="fragment"><div class="line"><span class="comment">// &lt;o&gt;Default Thread stack size [bytes] &lt;64-4096:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Defines default stack size for threads with osThreadDef stacksz = 0</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Default: 200</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_STKSIZE</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_STKSIZE 50</span></div>
<div class="line"><span class="preprocessor">#endif</span></div>
</div><!-- fragment --> The option <em>Default Thread stack size [bytes]</em> accepts values in the range <span class="XML-Token">[64..4096]</span>. The value (here <span class="XML-Token">200</span>) set in the field is divided by <span class="XML-Token">4</span> (&lt;#/4&gt;) . The result of the division (200/4) is put into the code symbol <em>OS_STKSIZE</em>, which was set to <span class="XML-Token">50</span>. The screen will display the number <span class="XML-Token">200</span>. See <a class="el" href="configWizard.html#configWizard_display">Tool-specific display</a>.   </td></tr>
</table>
<h1><a class="anchor" id="configWizard_codeExample"></a>
Code Example</h1>
<p>You can copy the code into a C-file and check the outcome in the uVision Editor.</p>
<div class="fragment"><div class="line"><span class="comment">//-------- &lt;&lt;&lt; Use Configuration Wizard in Context Menu &gt;&gt;&gt; -----------------</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">// &lt;h&gt;Thread Configuration</span></div>
<div class="line"><span class="comment">// =======================</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Number of concurrent running threads &lt;0-250&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines max. number of threads that will run at the same time.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 6</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TASKCNT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TASKCNT     6</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Default Thread stack size [bytes] &lt;64-4096:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines default stack size for threads with osThreadDef stacksz = 0</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 200</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_STKSIZE</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_STKSIZE     50</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Main Thread stack size [bytes] &lt;64-32768:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines stack size for main thread.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 200</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_MAINSTKSIZE</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_MAINSTKSIZE 50</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Number of threads with user-provided stack size &lt;0-250&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines the number of threads with user-provided stack size.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 0</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_PRIVCNT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_PRIVCNT     0</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Total stack size [bytes] for threads with user-provided stack size &lt;0-1048576:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines the combined stack size for threads with user-provided stack size.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 0</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_PRIVSTKSIZE</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_PRIVSTKSIZE 0</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">// &lt;q&gt;Check for stack overflow</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Includes the stack checking code for stack overflow.</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Note that additional code reduces the Kernel performance.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_STKCHECK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_STKCHECK    1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">// &lt;o&gt;Processor mode for thread execution </span></div>
<div class="line"><span class="comment">//   &lt;0=&gt; Unprivileged mode </span></div>
<div class="line"><span class="comment">//   &lt;1=&gt; Privileged mode</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Default: Privileged mode</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_RUNPRIV</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_RUNPRIV     1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">// &lt;h&gt;RTX Kernel Timer Tick Configuration</span></div>
<div class="line"><span class="comment">// ======================================</span></div>
<div class="line"><span class="comment">// &lt;q&gt; Use Cortex-M SysTick timer as RTX Kernel Timer</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Use the Cortex-M SysTick timer as a time-base for RTX.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_SYSTICK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_SYSTICK     1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span><span class="comment">//</span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer clock value [Hz] &lt;1-1000000000&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines the timer clock value.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 12000000  (12MHz)</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_CLOCK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_CLOCK       12000000</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer tick value [us] &lt;1-1000000&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines the timer tick value.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 1000  (1ms)</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TICK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TICK        1000</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">// &lt;h&gt;System Configuration</span></div>
<div class="line"><span class="comment">// =======================</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">// &lt;e&gt;Round-Robin Thread switching</span></div>
<div class="line"><span class="comment">// ===============================</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Enables Round-Robin Thread switching.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_ROBIN</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_ROBIN       1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Round-Robin Timeout [ticks] &lt;1-1000&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines how long a thread will execute before a thread switch.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 5</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_ROBINTOUT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_ROBINTOUT   5</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">// &lt;/e&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">// &lt;e&gt;User Timers</span></div>
<div class="line"><span class="comment">// ==============</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Enables user Timers</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERS</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERS      1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer Thread Priority</span></div>
<div class="line"><span class="comment">//                        &lt;1=&gt; Low</span></div>
<div class="line"><span class="comment">//     &lt;2=&gt; Below Normal  &lt;3=&gt; Normal  &lt;4=&gt; Above Normal</span></div>
<div class="line"><span class="comment">//                        &lt;5=&gt; High</span></div>
<div class="line"><span class="comment">//                        &lt;6=&gt; Realtime (highest)</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines priority for Timer Thread</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: High</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERPRIO</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERPRIO   5</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer Thread stack size [bytes] &lt;64-4096:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines stack size for Timer thread.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 200</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERSTKSZ</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERSTKSZ  50</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer Callback Queue size &lt;1-32&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Number of concurrent active timer callback functions.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 4</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERCBQS</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERCBQS   4</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">// &lt;/e&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">//   &lt;o&gt;ISR FIFO Queue size&lt;4=&gt;   4 entries  &lt;8=&gt;   8 entries</span></div>
<div class="line"><span class="comment">//                         &lt;12=&gt; 12 entries  &lt;16=&gt; 16 entries</span></div>
<div class="line"><span class="comment">//                         &lt;24=&gt; 24 entries  &lt;32=&gt; 32 entries</span></div>
<div class="line"><span class="comment">//                         &lt;48=&gt; 48 entries  &lt;64=&gt; 64 entries</span></div>
<div class="line"><span class="comment">//                         &lt;96=&gt; 96 entries</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; ISR functions store requests to this buffer,</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; when they are called from the interrupt handler.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 16 entries</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_FIFOSZ</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_FIFOSZ      16</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">//------------- &lt;&lt;&lt; end of configuration section &gt;&gt;&gt; -----------------------</span></div>
</div><!-- fragment --><h1><a class="anchor" id="configWizard_display"></a>
Tool-specific display</h1>
<p>It is left to the development tool to interpret and display Configuration Wizard Annotations. The uVision IDE displays the code above in the following way:</p>
<div class="image">
<img src="RTX_Conf_CM_Wizard_View.png" alt="RTX_Conf_CM_Wizard_View.png"/>
<div class="caption">
Configuration Wizard Display</div></div>
<p> <b>Where</b></p>
<p><em>Option</em> are device properties, which can be represented in a tree structure. Each item can have an explanatory tooltip.</p>
<p><em>Value</em> sets the option value. Can contain controls to encapsulate data in predefined drop-down lists. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Wed Jul 10 2019 15:21:00 for CMSIS-Pack Version 1.6.0 by Arm Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 
	-->
	</li>
  </ul>
</div>
</body>
</html>
